/*
*	(*^。^*) TFrameWork License (*^。^*)
*/

/*
 *  Title : 录制数据类 
 *          
 *  Description :  
 *          保存录制的数据
 *          录制数据的函数
 *          
 *  Date : 
 *
 *  Author : DengPing
 *
 *  Modify : 
 */

using System;
using UnityEngine;

namespace TFrameWork.Module.ActionEditor
{
    /// <summary>
    /// 保存的数据
    /// </summary>
    [System.Serializable]
    public struct RecordEventData : ICloneable
    {
        /// <summary>
        /// 当前帧 当前对象在世界坐标下转换到录制节点下的变换矩阵
        /// </summary>
        public Matrix4x4 localToRelativeRootWrold;

        public object Clone()
        {
            var clone = new RecordEventData();
            clone.localToRelativeRootWrold = new Matrix4x4(
                localToRelativeRootWrold.GetColumn(0),
                localToRelativeRootWrold.GetColumn(1),
                localToRelativeRootWrold.GetColumn(2),
                localToRelativeRootWrold.GetColumn(3));
            return clone;
        }
    }

    public static class RecordEventDataExtend
    {
        public static RecordEventData RecordData(this RecordEventData data)
        {
            return data;
        }
    }
}
